from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument("--proxy-server=http://ip:port")
chromeOptions.add_argument("--headless") #不打开浏览器
chromeOptions.add_argument("--disable-gpu") #禁用gpu
dirver_path = r"C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe"
driver = webdriver.Chrome(executable_path=dirver_path,chrome_options=chromeOptions)

driver.get("https://www.baidu.com")